1. Field of the Invention
The present invention relates to a numerical control device, and more particularly, to a numerical control device capable of restarting on a per machining step basis.
2. Description of the Related Art
A numerical control device for controlling a machine tool performs numerical control processing based on a machining program, and controls the machine tool based on the processing result of the numerical control processing to machine a workpiece.
As conventional techniques for restarting a program from an interrupted block or any program block which was already executed at a time when machining was interrupted during machining of a workpiece using the numerical control device, there are the following techniques.
Japanese Patent Laid-Open No. 63-265305 discloses, with respect to a program restart method of a numerical control device, a technique of determining, in the case where machining is interrupted during machining and is then to be restarted, the machining restart position by using a reverse function of returning a tool along the path it has been moving and restarting machining.
Japanese Patent Laid-Open No. 2009-053801 discloses, with respect to a numerical control device provided with a program restart function, a technique of restarting a program by distinguishing a non-cutting block at which a workpiece is not scratched even when the program is restarted and by acquiring program restart block data.
Japanese Patent Laid-Open No. 2009-223615 discloses, with respect to a numerical control device provided with a machining restart function, a technique of analyzing a program block performing machining during machining by a machining program, displaying, as a list, on a display unit, a plurality of pieces of program restart block data in the sequence of execution by using the analyzed program block, and selecting program restart block data from the screen displaying the list to thereby restart the program.
Japanese Patent Laid-Open No. 10-143229 discloses, with respect to a machining program of a machine tool control device including a plurality of steps, a technique of distinguishing, at the time of start of execution of the machining program, the step program to which the state of a machine tool corresponds, and starting the program from a step specified in advance based on a condition specified in advance.
Japanese Patent Laid-Open No. 05-158517 discloses, with respect to a numerical control device for reading and executing a machining program, a technique of recognizing a limit point of a step by adding identification information to each machining step configuring the machining program, separately from machining execution, and displaying and selecting identification information to thereby skip the steps preceding a selected step and restart the machining step.
Japanese Patent Laid-Open No. 09-258811 discloses, with respect to a numerical control device for controlling operation of a machine tool according to a machining program including a plurality of sequential single task programs, a technique of storing and recognizing the machining part of each step so that when an abnormality is detected when an operator is not around, if the machining part where the abnormality is detected is a registered abnormality-present machining part, the step may be automatically skipped without the machine being stopped.
With any of the techniques disclosed in Japanese Patent Laid-Open No. 63-265305, Japanese Patent Laid-Open No. 2009-053801, and Japanese Patent Laid-Open No. 2009-223615, a program is analyzed during execution of machining according to a machining program of a numerical control device. Thus, any portion may be selected from the block which has been performed until interruption of the machining, and restart from the portion may be performed. However, since analysis of the program is performed during execution of machining, restart from a portion where machining is not performed cannot be performed.
Accordingly, it is difficult to satisfy all of the demands of the following cases:
(1) A case where restart is performed from a machining step which is not related to the reason of an interruption and which is not yet performed, because preparation of recovery of the interrupted portion takes time;
(2) A case where machining steps that cannot be performed due to the reason of an interruption are intermittently present, and it is desired to perform other machining steps only;
(3) A case where a restart portion is desired to be reliably and easily selected regardless of the ability of the operator;
(4) A case where, when, after restarting is performed, it becomes ready to recover an interrupted portion during running of a program, it is desired to change the sequence of steps including a machining step not yet performed so as to recover the interrupted portion and to sequentially perform the interrupted portion after the current step being performed is ended.
With the technique disclosed in Japanese Patent Laid-Open No. 10-143229, a machining program including a plurality of step programs may be started from a step specified in advance based on a condition specified in advance, but restarting of the program may be performed only from a step satisfying the condition specified in advance, and thus, depending on the reason of an interruption, the program may have to be rewritten, and the operator's effort and ability may be required.
With the technique disclosed in Japanese Patent Laid-Open No. 05-158517, steps prior to a selected step may be skipped by recognizing a limit point of a step by adding identification information to each machining step and by displaying and selecting the identification information. However, since the identification information is added to each machining step, the identification information is not added to a step where the machining step is not ended, and it is not possible to skip a step after the selected step. Accordingly, application to a case where the steps to be skipped are intermittently present is not possible.
With the technique disclosed in Japanese Patent Laid-Open No. 09-258811, the machining portion of each step has to be stored in advance for each workpiece to be machined, and an advance preparation for each workpiece becomes necessary, and the ability of the operator may be required.
Accordingly, in view of these problems, the present invention has its aim to provide a numerical control device allowing easy restarting of an operation from a machining step not yet performed, regardless of the ability of an operator, after machining by a machining program of the numerical control device is interrupted.
A numerical control device, including a programmed machining restart function, according to the present invention, controls a machine tool and machines a workpiece by analyzing and executing a machining program on a per block basis, the numerical control device including a setting unit for setting in advance, for the machining program including a plurality of machining steps, specific codes indicating limit points of the machining steps, an analysis/detection unit for analyzing the machining program, and detecting the specific code at an arbitrary timing, a data acquisition/saving unit for acquiring and saving a location in a memory where a block of the specific code detected by the analysis/detection unit is stored, a first display unit for displaying the specific codes, as a list, by using a plurality of locations in the memory that are acquired and saved by the data acquisition/saving unit, a specification unit for specifying, among the specific codes displayed as a list by the first display unit, a specific code selected by an input from outside, and a program restart unit for executing, by using a location in the memory of the specific code that is specified by the specification unit, a restart operation of the machining program from a machining step including the specific code that is specified.
An analysis of detecting only a specific code, as a limit point of a step, specified by a parameter or the like (for example, an arbitrary code specified by a user such as “$$” or a tool change command such as M6) at an arbitrary timing such as at the time of start of execution of the machining program, during execution of the machining program, or during registration of the machining program is performed, and locations in a memory where all the specific codes detected and their blocks are stored are acquired and saved. Also, by allowing selection by a cursor or the like of saved data by displaying saved data as a list, and allowing restart of the program from a specific code block by using the location in the memory of the selected specific code, the program may be easily restarted from a machining step not yet executed.
There may also be provided second display unit for displaying, by using the location in the memory of the specific code specified by the specification unit among the specific codes displayed as a list by the first display unit, a block of the specific code and a predetermined number of blocks to be subsequently executed according to a program counter.
By displaying the block of a selected specific code and a predetermined number of blocks to be subsequently executed according to a program counter, the machining step to which the selected specific code corresponds may be recognized, and an operator is enabled to easily understand the contents of the specific code.
The arbitrary timing may be configured to be selected from among immediately before start of execution of the machining program, during execution of the machining program, during registration of the machining program, and a timing specified by an external input appliance.
A tool change command that is executed in each machining step may be taken as the specific code.
By taking a tool change command as the specific code, setting and embedding of a tool change command as a separate parameter become unnecessary, and the work may be performed more easily.
There may also be provided a first input setting specification unit for specifying a set machining sequence of the machining steps including the specific codes displayed by the first display unit as a list.
There may also be provided a machining step sequence specification/execution unit for causing the machining program to be executed according to the machining sequence of the machining steps specified by the first input setting specification unit, by using locations in the memory that are acquired and saved by the data acquisition/saving unit.
By including the specification unit for specifying, for specific codes that are displayed as a list by the first display unit, the machining sequence that is input and set, the machining sequence of machining steps to which respective specific codes correspond may be changed without editing the machining program itself. Accordingly, for example, in the case where there is a machining step that cannot be executed due to the reason of an interruption, the machining step that cannot be executed may be skipped, and subsequent machining steps that are not yet executed may be executed.
There may also be provided a second input setting specification unit for specifying a pause designation for the machining program that is set to a time of end of a machining step among the machining steps including the specific codes that are displayed by the first display unit as a list, a machining step end detection unit for detecting the end of the machining step by using the location in the memory that is acquired and saved by the data acquisition/saving unit, and a pause execution unit for executing pause of the machining program at the time of end of the machining step specified by the second input setting specification unit.
By providing the specification unit for specifying, in a specific code list display, an input machining step which is desired to be paused, pause may be executed after execution of the machining step which has been input and set.
Moreover, by enabling changing of the machining sequence and of input setting of pause also during program operation, when it becomes ready to recover an interrupted portion during program operation, recovery of the interrupted portion may be performed after the current machining step is ended, and also, the step sequence including machining steps not yet executed may be changed to sequentially execute the interrupted step.
With the structures described above, the present invention is able to provide a numerical control device which, after machining according to a machining program is interrupted, allows restarting of the operation from a machining step not yet executed with ease regardless of the ability of the operator.